import request from '@/utils/request'

// 查询商品信息列表
export function listGoodsInfo(query) {
  return request({
    url: '/business/goodsInfo/list',
    method: 'get',
    params: query
  })
}

// 查询商品信息详细
export function getGoodsInfo(skuBarCode) {
  return request({
    url: '/business/goodsInfo/' + skuBarCode,
    method: 'get'
  })
}

// 新增商品信息
export function addGoodsInfo(data) {
  return request({
    url: '/business/goodsInfo',
    method: 'post',
    data: data
  })
}

// 修改商品信息
export function updateGoodsInfo(data) {
  return request({
    url: '/business/goodsInfo',
    method: 'put',
    data: data
  })
}

// 删除商品信息
export function delGoodsInfo(skuBarCode) {
  return request({
    url: '/business/goodsInfo/' + skuBarCode,
    method: 'delete'
  })
}


export function fetchFromWeimob(data) {
  return request({
    url: '/business/goodsInfo/batchInsertGoodsByWm',
    method: 'post',
    data: data
  })
}


export function countSum(query) {
  return request({
    url: '/system/notice/countSumTotal',
    method: 'get',
    data: query
  })
}


export function countDetailTotal(query) {
  return request({
    url: '/system/notice/countDetailTotal',
    method: 'get',
    data: query
  })
}
